<template>
  <div style="display: inline-block;">
    <div @click="drawShow">
      <slot name="reference"></slot>
    </div>

    <el-dialog class="ne-pending-task" append-to-body :width="isContent.width" :top="isContent.top" :title="isContent.title" v-if="isShow2" :visible.sync="isShow2">
			<component @windowClose="windowClose" @changeData="changeData"  :is="isContent.content"  :ODKInfo="isContent.ODKInfo" :CTOInfo="isContent.CTOInfo"></component>
		</el-dialog>

  </div>
</template>

<script>
import OrderManager from "@/components/custorder/pengding/OrderManager";
import OrderManager1 from "@/components/custorder/OrderManagerY";
import Rent from "@/components/custorder/pengding/Rent";
export default {
  components: {
    OrderManager,
    OrderManager1,
    Rent
  },
  props: {
    isContent:{
      type:Object
    },
    webPage:[String],
    title: [String],
    size: [String],
    btnShow: [String],
    dialogTitle: [String],
    userInfo: {
      type: String,
      default() {
        return "1";
      },
    },
  },
  data() {
    return {
      drawerBtn: false,
      direction: "rtl",
      loading: false,
      isShow2: false,
      extraData: {}
    };
  },
  mounted() {},
  methods: {
    drawShow() {
       this.$emit("drawShow");
      if (this.userInfo == "1") {
        this.$nextTick(function() {
          this.isShow2 = true;
        });
      } else {
        this.openMessage();
      }
    },
    closeDrawer() {
      this.$emit("closeDrawer");
      this.isShow2 = false;

    },
    changeData(){
        this.$emit("changeData");
    },
    cancelForm() {
      this.$emit("cancelForm");
      
      this.isShow2 = false;


    },
    windowClose(){
       
        this.isShow2 = false;
    },
    //  消息提示对话框
    openMessage() {
      this.$alert("请注意该用户为实名认证", "警告", {
        type: "warning",
        confirmButtonText: "关闭",
      });
    },
  },
  watch: {

  },
};
</script>
<style lang="scss" scoped>
.el-footer {
  position: absolute;
  display: block;
  bottom: 5px;
  width: 100%;
}
.demo-drawer__footer {
  text-align: center;
  position: absolute;
  bottom: 0;
}
.demo-drawer__footer button {
  display: inline-block;
  width: 45%;
}
.el-drawer__header {
  display: none;
}
.contain {
  margin: 0;
}
.text-c {
  text-align: center;
  padding: 0.1rem 0.3rem;
}
.el-drawer__header {
  display: none;
}
</style>
